package com.itheima.dbservice;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.itheima.mapper.SimilarYouMapper;
import com.itheima.pojo.SimilarYou;
import lombok.Data;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class SimilarYouServiceApiImpl implements SimilarYouServiceApi{
    @Autowired
    private SimilarYouMapper similarYouMapper;

    @Override
    public List<SimilarYou> getByUid(Integer uid) {
        LambdaQueryWrapper<SimilarYou> lqw = new LambdaQueryWrapper<>();
        lqw.eq(SimilarYou::getUid, uid);
        return similarYouMapper.selectList(lqw);
    }
}
